#define _CRT_SECURE_NO_WARNINGS 1
#include"queue.h"
#include "BinaryTree.h"
BTNode* buynode(int x)
{
	BTNode* node = (BTNode*)malloc(sizeof(BTNode));
	node->data = x;
	node->left = NULL;
	node->right = NULL;
	return node;
}
BTNode* CreateTree()
{
	BTNode* node1 = buynode(1);
	BTNode* node2 = buynode(2);
	BTNode* node3 = buynode(3);
	BTNode* node4 = buynode(4);
	BTNode* node5 = buynode(5);
	BTNode* node6 = buynode(6);
	
	node1->left = node2;
	node1->right = node4;
	node2->left = node3;
	node2->right = node5;
	node4->left = node6;

	return node1;
}
int main()
{
	BTNode* root = CreateTree();
	BinaryTreePrevOrder(root);
	printf("\n");
	BinaryTreeInOrder(root);
	printf("\n");
	BinaryTreePostOrder(root);
	printf("\n");
	int ret=BinaryTreeSize(root);
	printf("%d\n", ret);
	int ser = BinaryTreeLeafSize(root);
	printf("%d\n", ser);
	int des = BinaryTreeLevelKSize(root, 3);
	printf("%d\n", des);

	//BinaryTreeLevelOrder(root);
	//int ret=BinaryTreeComplete(root);
	printf("%d\n", ret);
	return 0;
}